package com.goldmantis.alitrip.common.sysenum;

/**
 * @Author:Shmily
 * @Description:日志分类
 * @Date:Create in 11:13 2018/2/26
 */
public enum EnumLogCatagory {

    login(1,"登陆"),
    logout(2,"登出"),
    access(3,"访问"),
    operation(4,"操作"),
    exception(5,"异常");

    EnumLogCatagory(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    private Integer value;

    private String text;

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static String getTextByValue(Integer value){
        for(EnumLogCatagory logCatagory : EnumLogCatagory.values()) {
            if(logCatagory.getValue().intValue()==value.intValue()){
                return logCatagory.getText();
            }
        }
        return null;
    }
}
